class CreateUserCourses < ActiveRecord::Migration
  def self.up
    create_table(:user_courses, {:force => true, :options =>'ENGINE=InnoDB DEFAULT CHARSET=utf8'}) do |t|
      t.column :user_id,                  :integer, :null => false
      t.column :course_id,                :integer, :null => false
      t.column :progress,                 :integer, :default => 0
      t.column :sessiontime,              :integer, :default => 0
      t.timestamps
    end
  end

  def self.down
    drop_table :user_courses
  end
end
